//
//  stack.h
//  Algorithm
//
//  Created by ViliWen on 1/18/16.
//  Copyright © 2016 wlf92. All rights reserved.
//

#ifndef stack_h
#define stack_h

#include <stdio.h>
#include <stdlib.h>
#include "list.h"

typedef List Stack;
#define statk_int list_int
#define stack_destroy list_destroy

int stack_push(Stack *stack, const void *data);
int stack_pop(Stack *stack, void **data);

#define stack_peek(stack) ((stack)->head == NULL ? NULL : (stack)->head->data)
#define stack_size list_size


#endif /* stack_h */
